import { connect } from "./react-redux/connect";
import { inc, dec } from './redux/actions'

const App = (props) => {

  // console.log('app props: ', props);

  const incClick = () => {
    props.inc();
  }
  const decClick = () => {
    props.dec();
  }

  return <div>
    <h3>current count: {props.number.count}</h3>
    <h3>hi, click to increament this count!</h3>
    <button onClick={incClick}>click inc</button>
    <h3>hi, click to decreament this count!</h3>
    <button onClick={decClick}>click dec</button>
  </div>
}

export default connect(
  state => ({ number: state }),
  { inc, dec }
)(App);